<?php
//删除页面
//包含数据库配置文件
include '../../public/dbconfig.php';

//包含数据库文件
include '../../public/func.inc.php';
//调用
$link = conn();
//var_dump($link);

//a连接 通过get方式获取值
$cid = $_GET['cid'];

//准备sql
$sql = "delete from bbs_reply where id='{$cid}'";
//var_dump($sql);

//执行sql
$res = mysqli_query($link,$sql);
//判断
if($res){
	echo '<script>alert("删除成功");window.location.href="list.php";</script>';
}else{
	echo '<script>alert("删除失败");window.location.href="list.php";</script>';
}

mysqli_close($link);